status/volume: Redundant volume pushes cause DSP crackling
Dragging the Quick Settings volume slider generates a dense sequence of
value notifications. After GVC rounds a requested value and scales the
channel map, several consecutive notifications can result in the same
effective channel volumes.
The shell currently assigns the value through the GObject property and
calls push_volume() unconditionally. The property setter discards the
boolean returned by gvc_mixer_stream_set_volume(), so unchanged values are
sent to the audio backend again.
This is audible with PipeWire DSP sinks. Volume changes pass through a
virtual filter sink and its processing graph before reaching the hardware
sink. The redundant pushes repeatedly update that control path while the
slider is moving, producing crackles. Native hardware sinks make the same
shell behavior much less apparent.
GNOME Settings does not show the problem because its volume slider calls
gvc_mixer_stream_set_volume() directly and only pushes the volume when the
effective channel map changed.
The Quick Settings slider now follows the same behavior and reuses the
returned change state for notification handling.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4302>
(cherry picked from commit
bd5f0a10d101d2ac2110ea8e902eb9515749324c)